// System Unit
// GUID

(*************)
(* Interface *)
(*************)
{$IFDEF Include_Modules_Header}

 Type
  PGUID = ^TGUID;

  TGUID = Packed Record
   Class Operator Equal(Const Left, Right: TGUID): Boolean;
   Class Operator NotEqual(Const Left, Right: TGUID): Boolean;
   Class Function Empty: TGUID; Static;
   Case Boolean of
    True: (D1: LongWord; D2: Word; D3: Word; D4: Array [0 .. 7] of Byte);
    False: (I: Array [0 .. 3] of Integer);
  END;

{$ENDIF Include_Modules_Header}
(******************)
(* Implementation *)
(******************)
{$IFDEF Include_Modules_Implement}

 Class Operator TGUID.Equal(Const Left, Right: TGUID): Boolean;
  BEGIN
   Result:= (Left.I[0] XOR Right.I[0]) OR (Left.I[1] XOR Right.I[1]) OR (Left.I[2] XOR Right.I[2]) OR (Left.I[3] XOR Right.I[3]) = 0;
  END;

 Class Operator TGUID.NotEqual(Const Left, Right: TGUID): Boolean;
  BEGIN
   Result:= NOT(Left = Right);
  END;

 Class Function TGUID.Empty: TGUID;
  BEGIN
   Result.I[0]:= 0;
   Result.I[1]:= 0;
   Result.I[2]:= 0;
   Result.I[3]:= 0;
  END;

{$ENDIF Include_Modules_Implement}
(******************)
(* Initialization *)
(******************)
{$IFDEF Include_Modules_Initialize}
{$ENDIF Include_Modules_Initialize}
(****************)
(* Finalization *)
(****************)
{$IFDEF Include_Modules_Finalize}
{$ENDIF Include_Modules_Finalize}
